﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Kinect_Interface_Prototype_1.Interface_Design
{
    public partial class ManualForm : Form
    {
        private Dictionary<TreeNode, ManualPage> ManualPages = new Dictionary<TreeNode, ManualPage>();

        public ManualForm()
        {
            InitializeComponent();

            Panel panel = new Panel();
            panel.Dock = DockStyle.Fill;

            this.Controls.Add(panel);
        }

        private void treeView_Click(object sender, EventArgs e)
        {
            Point mousePosition = Control.MousePosition;
            Point treePoint = treeView.PointToClient(mousePosition);

            // Gets the item that was hit (if an item was hit)
            TreeViewHitTestInfo itemHitInfo = treeView.HitTest(treePoint.X, treePoint.Y);

            // Check to see if an item was clicked on
            if (itemHitInfo.Node != null)
            {

            }
        }

        protected class ManualPage
        {
            public List<Panel> Panels;

            public ManualPage(List<Panel> panels)
            {
                Panels = panels;
            }

            public Image NextPage(int page)
            {
                //if (page < Images.Count - 1)
                //    return Image.FromStream(new FileStream(Constants.ManualImages + Images[page+1], FileMode.Open, FileAccess.Read);

                return null;
            }

            public Image PreviousPage(int page)
            {
                //if (page > 0)
                //    return Image.FromStream(new FileStream(Constants.ManualImages + Images[page+1], FileMode.Open, FileAccess.Read);

                return null;
            }

        }
    }
}
